﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;

namespace STAR.Spring.Framework.Module
{
    public static class ResponseInfoConvert
    {
        public static string ToBaseResponse(this ReturnInfo info)
        {
            return ToJSON(info);
        }
        public static string ToBaseResponse(this List<ReturnInfo> info)
        {
            return ToJSON(info);
        }
        public static string ToJSON(object obj)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            return serializer.Serialize(obj);
        }
    }
}
